<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:p="http://primefaces.org/ui">
	  
<f:view locale="#{switcher.currentLocale}">	  

<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style type="text/css">  
           .ui-widget {  
               font-size: 10px !important;  
           }  
</style>

<title>#{msg.transfTerceiro}</title>

	<ui:include src="/layout/Header.xhtml" />
</h:head>

<h:body>
	<ui:include src="/layout/SubMenu_Transferencias.xhtml" />
<center>	
			<h4>#{msg.transacaoTerceiro}</h4>
			#{msg.preenchaValor}<br/>
	<br/>
	<h:form id="submit">
	
	
	<table>
	<tr>
		<td>
			#{msg.saldoDisp}:
		</td>
		<td>R$ <h:outputText value="#{cliente.contaCorrente.saldo}" >
				<f:convertNumber minFractionDigits="2" />
				</h:outputText>
		</td>
	</tr>
	<tr></tr>
	<tr>
		<td>
			#{msg.agencia}:
		</td>
		<td>
			<h:inputText id="ag" value="#{transacaoManagedBean.transacao.agenciaD}" size="11" maxlength="4"
			required="true" requiredMessage="#{msg.agencia}: #{msg.campoObrigatorio}"
			validator="#{validator.verificadorGuardarAg}" 
			converterMessage="#{msg.ag}: #{msg.valorInvalido}" 
			validatorMessage="#{msg.ag}: #{msg.valorInvalido}" >
				<f:validateLongRange minimum="0"/>
			</h:inputText>
		</td>
	</tr>
	<tr>
		<td>
			#{msg.cc}:	
		</td>
		<td>
			<h:inputText id="cc" value="#{transacaoManagedBean.transacao.contaD}" size="11" maxlength="4"
			required="true" requiredMessage="#{msg.cc}: #{msg.campoObrigatorio}" 
			validator="#{validator.verificarTerceiro}" 
			converterMessage="#{msg.cc}: #{msg.valorInvalido}" >
				<f:validateLongRange minimum="0"/>
			</h:inputText>
		</td>
	</tr>
	<tr>
		<td>
			#{msg.valorToTransf}:
		</td>
		<td>
			R$ <h:inputText id="valor" value="#{transacaoManagedBean.transacao.valor}" size="7" maxlength="9"
			required="true" requiredMessage="#{msg.valorToTransf}: #{msg.campoObrigatorio}" 
			converterMessage="#{msg.valorToTransf}: #{msg.valorInvalido}" >
				<f:validateDoubleRange minimum="0.05" />
			</h:inputText>
			
		</td>
	</tr>
	<tr>
		<td valign="top">
			#{msg.descricao}:
		</td>
		<td>
			 <p:inputTextarea value="#{transacaoManagedBean.transacao.descricao}" rows="5" cols="30" counter="display" maxlength="50" counterTemplate="{0} #{msg.charRemain}" autoResize="false" />
   			 <br/><h:outputText id="display" />
		</td>
	</tr>
	</table>	
	
	<h:commandButton id="transferir" value="#{msg.transferir}" action="transacaoConfirm" >
		<f:setPropertyActionListener target="#{transacaoManagedBean.tipoTransacao}" value="transfToTerc"></f:setPropertyActionListener>
	</h:commandButton>	
	</h:form>
	
	<h:form>
	<h:commandButton id="buscarFavorito" value="#{msg.buscarFavorito}" action="consultarFavoritos.faces?faces-redirect=true" />
	</h:form>
	
	<h:message for="ag" style="color:red" /> <br/>
	<h:message for="cc" style="color:red" /> <br/>
	<h:message for="valor" style="color:red" /> <br/>
	
	
</center>
</h:body>
</f:view>
</html>













